package com.hancher.api;

import com.hancher.common.net.NetUtil;

import lombok.Data;
import lombok.Getter;

@Data
public class SupabaseManager {
    private static volatile SupabaseManager singleton;
    public static final String APP_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFrc2RsZ3FxenhodmF2b2F4ZXNxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDA0NzA0MDUsImV4cCI6MjA1NjA0NjQwNX0.TGqMI5BFHn_OTdiLCff38PHy6yHbTEgs_Sd0pjcQKPE";

    private SupabaseManager() {
    }

    public static SupabaseManager getInstance() {
        if (singleton == null) {
            synchronized (SupabaseManager.class) {
                if (singleton == null) {
                    singleton = new SupabaseManager();
                }
            }
        }
        return singleton;
    }

    public static String HOST = "https://qksdlgqqzxhvavoaxesq.supabase.co/rest/v1/";
    @Getter
    private SupabaseApiService service = new NetUtil<>(SupabaseApiService.class)
            .setBaseUrl(HOST).setUseJump(false).setTimeOut(600).build();

}
